package com.yb.login.center.controller;

import com.yb.core.bean.Resp;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Copyright (C), 2022-2022, 姚兵
 * Author: 32210
 * Date: 2022/11/13 20:19
 * FileName: AdminController
 * Description:
 */

@RestController
public class AdminController {

    @RequestMapping("admin")
    @PreAuthorize("hasAuthority('ROLE_ADMIN')")
    public Resp admin(){
        return Resp.ok().data("请求成功");
    }
}
